let set = new Set([1,2,3,1]);
let array = [...set];
console.log(array);
array=Array.from(set);
console.log(array);

let map = new Map([[0,1],[1,2]]);
let matrix = [...map];
console.log(matrix);
